<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>58链车-二手车交易市场</title>
<meta name="description" content="买卖二手车,急卖二手车,省心二手车,性价比高二手车,专业二手车,58链车网!" />
<link rel="stylesheet" href="/Public/Home/css/reset.css">
<link rel="stylesheet" href="/Public/Home/css/common.css">
<link rel="stylesheet" href="/Public/Home/css/swiper-2.7.6.css">
<link rel="stylesheet" href="/Public/Home/css/index.css">
<script src="/Public/Home/js/jquery-1.12.4.min.js"></script>
<script src="/Public/Home/js/common.js"></script>
<script src="/Public/Home/js/swiper-2.7.6.min.js"></script>
<script src="/Public/Home/js/index.js"></script>
<!--[if IE 8]>
<script>
$(document).ready(function () {
	$(".list li:nth-child(4n)").css("margin-right", "0");
});
</script>
<![endif]-->
</head>
<body>
<!-- header start -->
	<!-- header start -->
<div class="index-header">
    <div class="header">
        <!-- logo start -->
        <a class="header-logo" href="/"></a>
        <!-- logo end -->
        <!-- city start -->
        <div class="header-city-cur">
            <span id="mycity"><?php echo (session('mycity')); ?></span>
            <div class="header-city-select">
                <p id="a" class="column-head">选择城市</p>
                <div class="header-city-wrap clearfix">
                    <?php if(is_array($citys)): $i = 0; $__LIST__ = $citys;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$city): $mod = ($i % 2 );++$i;?><a href="<?php echo U('Home/Index/changecity',array('ci'=>$city['mkc'],'citype'=>1));?>"><?php echo ($city["mkc"]); ?></a><?php endforeach; endif; else: echo "" ;endif; ?>
                </div>
                <p id="a" class="column-head">选择市场</p>
                <div class="header-city-wrap clearfix">
                    <?php if(is_array($mks)): $i = 0; $__LIST__ = $mks;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$mk): $mod = ($i % 2 );++$i;?><a href="<?php echo U('Home/Index/changecity',array('ci'=>$mk['mkname'],'citype'=>0));?>"><?php echo ($mk["mkname"]); ?></a><?php endforeach; endif; else: echo "" ;endif; ?>
                </div>
                <p class="header-city-more">更多城市/市场正在加紧筹备，敬请期待。</p>
            </div>
        </div>
        <!-- city end -->
        <!-- phone start -->
        <p class="header-phone">
            全国统一热线：<span>400-100-1313<br><span class="header-phone-small">400-100-要车要车</span></span>
        </p>
        <!-- phone end -->
        <!-- search start -->
        <div class="header-search">
            <input class="header-search-input" type="text" id="keywords" placeholder="搜索您想要的车">
            <button class="header-search-btn" onclick="javascript:search()">搜索</button>
        </div>
        <!-- search end -->
    </div>
</div>
<!-- header end -->

<!-- nav start -->
<div class="nav-wrap">
    <div class="nav">
        <a class="nav-link <?php if(MODULE_NAME== Index && ACTION_NAME== index): ?>cur<?php endif; ?>" href="<?php echo U('Home/Index/index');?>">首页</a>
        <a class="nav-link <?php if(CONTROLLER_NAME== Index && ACTION_NAME== get_car_list): ?>cur<?php endif; ?>" href="<?php echo U('Home/Index/get_car_list');?>?pa=0&ma=40&or=d&pl=<?php echo (session('mycity')); ?>&ci=<?php echo (session('citype')); ?>">全部车型</a>
        <a class="nav-link <?php if(CONTROLLER_NAME== Seller && ACTION_NAME== index): ?>cur<?php endif; ?>" href="<?php echo U('Home/Seller/index');?>">我要寄售</a>
        <a class="nav-link" href="#">资讯</a>
        <a class="nav-link" href="#">网点</a>
         <!--登录显示-->
        <?php if($_SESSION['user_id']!= null): ?><div class="xly_right cur">
                <a href="#"><?php echo (session('username')); ?></a>
            </div>
        <?php else: ?>
            <!--未登录显示-->
            <div class="xly_right unlog">
                <a href="javascript:login();">登录</a>&nbsp;/&nbsp;
                <a href="javascript:register();">注册</a>
            </div><?php endif; ?>
    </div>
</div>
<!-- nav end -->
<!--注册 开始-->
<div class="xloginreg" id="register" style="display:none;">
    <div class="xreg">
        <p>注册账号 <span class="close">×</span></p>
        <div class="xregdiv">
            <input type="number" id="reg_username" placeholder="请输入手机号码" class="input" style="margin-top:0px">
            <p class="tishi" id="no_reg_username">忘记填写手机号码了哦~</p>
            <div class="yzm_cont clearfix">
                <input type="text" id="reg_phone_code" placeholder="手机验证码" class="input" style="width:150px">
                <p class="tishi" id="no_reg_phone_code">忘记填写手机验证码了哦~</p>
                <input type="button" value="获取验证码" onclick="phone_code()" class="regyzm" id="reg_yzm">
            </div>
            <div class="yzm_cont clearfix">
                <input type="text" id="reg_img_code" placeholder="请输入图片码" class="input" style="width:150px">
                <img src="/Home/Post/img_code" alt="" class="yzm_img"   onClick="this.src='/Home/Post/img_code?'+Math.random();">
                <p class="tishi" id="no_reg_img_code">图片验证码错误~</p>
            </div>
            <input type="password" id="reg_password" placeholder="设置密码" class="input">
            <p class="tishi" id="no_reg_password">忘记填写密码了哦~</p>
            <p class="xregp">有账号，<a href="#">去登录></a></p>
            <input type="button" value="立即注册" onclick="click_reg()" class="input xregbtn">
        </div>
    </div>
</div>
<!--注册结束-->
<!--登录开始-->
<div class="xloginreg" id="login" style="display:none;">
    <div class="xreg xlogin">
        <p>登录账号 <span class="close">×</span></p>
        <div class="xregdiv">
            <input type="number" id="username" placeholder="请输入手机号码" class="input" style="margin-top:0px">
            <p class="tishi" id="no_username">忘记填写手机号码了哦~</p>
            <div class="yzm_cont clearfix">
                <input type="text"  id="img_code" placeholder="请输入图片码" class="input" style="width:150px">
                <img width="100" height="43" src="/Home/Post/img_code"  onClick="this.src='/Home/Post/img_code?'+Math.random();" >
                <p class="tishi" id="no_img_code">图片验证码错误~</p>
            </div>
            <input type="password"  id="password" placeholder="请输入密码" class="input">
            <p class="tishi" id="no_password">忘记填写密码了哦~</p>
            <p class="xregp">没有账号，<a href="#">去注册></a></p>
            <input type="button" value="立即登录" onclick="click_login()" class="input xregbtn">
        </div>
    </div>
</div>
<!--登录结束-->

<!-- header end -->

<script type="text/javascript">

//推荐
$(function(){
	for(var i=0;i<document.cookie.split(";").length;i++)
	{
		if(document.cookie.split(";")[i].split("=")[0]=='price')
		{
		   var p=document.cookie.split(";")[i].split("=")[1];
		}
	}
	var star =parseFloat(p)-(parseFloat(p)*0.5);
	var end =parseFloat(p)+(parseFloat(p)*0.5);
	if(!star){star=0}
	if(!end){end=100}
	$.ajax({
	    url: "/home/index/get_car_list?pa=0&ma=8&or=d&pr=" + star + "-" + end + "&pl=<?php echo (session('mycity')); ?>&ci=<?php echo (session('citype')); ?>&show=index",
			type:"get",
			dataType:'html',
			success:function(res){
			    $('#like').append(res);
			}
	   })
  
});
//新车
$(function () {
    $.ajax({
        url: "/home/index/get_car_list?pa=0&ma=8&or=n&pl=<?php echo (session('mycity')); ?>&ci=<?php echo (session('citype')); ?>&show=index",
        type: "get",
        dataType: 'html',
        success: function (res) {
			$('#news').append(res);
        }
    }) 
});
//准新车
$(function () {
    $.ajax({
        url: "/home/index/get_car_list?pa=0&ma=8&or=d&tag=准新车&pl=<?php echo (session('mycity')); ?>&ci=<?php echo (session('citype')); ?>&show=index",
        type: "get",
        dataType: 'html',
        success: function (res) {
			$('#newcar').append(res);
        }
    })

});

//练手车
$(function () {
    $.ajax({
        url: "/home/index/get_car_list?pa=0&ma=8&or=pa&tag=练手车&pl=<?php echo (session('mycity')); ?>&ci=<?php echo (session('citype')); ?>&show=index",
        type: "get",
        dataType: 'html',
        success: function (res) {
			$('#wago').append(res);
        }
    })
});
//suv
$(function () {
    $.ajax({
        url: "/home/index/get_car_list?pa=0&ma=8&or=d&mo=suv&pl=<?php echo (session('mycity')); ?>&ci=<?php echo (session('citype')); ?>&show=index",
        type: "get",
        dataType: 'html',
        success: function (res) {
			$('#suv').append(res);
        }
    })
});

//急售
$(function () {
    $.ajax({
        url: "/home/index/get_car_list?pa=0&ma=8&or=d&wat=1&pl=<?php echo (session('mycity')); ?>&ci=<?php echo (session('citype')); ?>&show=index",
        type: "get",
        dataType: 'html',
        success: function (res) {
            $('#cutprice').append(res);
        }
    })

});
function getRedirectUrl(p)
{
    window.location.href = '/home/index/get_car_list?pa=0&ma=40&ci=<?php echo (session('citype')); ?>&pl=<?php echo (session('mycity')); ?>' + p;
}
</script>
<style type="text/css">
	.pinpai{
		padding: 5px 5px;
	}
	.subnav-brand-wrap{font-size: left;}
</style>
<!-- subnav and banner start -->
<div class="wrap clearfix">
	<div class="subnav">
		<p class="subnav-text">我要买车</p>
		<div class="subnav-brand">
			<p class="subnav-title">品牌</p>
			<div class="subnav-hot-brand clearfix" id="hotbrand">
			</div>
			<div class="subnav-brand-select">
				<p class="subnav-brand-select-title">所有品牌</p>
				<?php if(is_array($pinpai)): $i = 0; $__LIST__ = $pinpai;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?><p class="subnav-brand-index"><?php echo ($key); ?></p>
					<div class="subnav-brand-wrap clearfix" id="<?php echo ($key); ?>">
						<?php if(is_array($v)): $i = 0; $__LIST__ = $v;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$p): $mod = ($i % 2 );++$i;?><a class="pinpai" href="javascript:getRedirectUrl('&br=<?php echo ($p); ?>')"><?php echo ($p); ?></a><?php endforeach; endif; else: echo "" ;endif; ?>
					</div>
					<div class="clearfix"></div><?php endforeach; endif; else: echo "" ;endif; ?>
			</div>
		</div>

		<p class="subnav-title">价格</p>
		<div class="subnav-hot-price clearfix">
			<a href="javascript:getRedirectUrl('&pr=0-3')" name="0-3">3万以下</a>
			<a href="javascript:getRedirectUrl('&pr=3-5')" name="3-5">3-5万</a>
			<a href="javascript:getRedirectUrl('&pr=5-10')" name="5-10">5-10万</a>
			<a href="javascript:getRedirectUrl('&pr=10-15')">10-15万</a>
			<a href="javascript:getRedirectUrl('&pr=15-20')">15-20万</a>
			<a href="javascript:getRedirectUrl('&pr=20-30')">20-30万</a>
			<a href="javascript:getRedirectUrl('&pr=30-60')">30-60万</a>
			<a href="javascript:getRedirectUrl('&pr=>60')">60万以上</a>
		</div>

		<p class="subnav-title">车型</p>
		<div class="subnav-hot-class clearfix">
			<a class="suv" href="javascript:getRedirectUrl('&mo=SUV')">SUV</a>
			<a class="mvp" href="javascript:getRedirectUrl('&mo=MPV')">MPV</a>
			<a class="roadster" href="javascript:getRedirectUrl('&mo=跑车')">跑车</a>
			<a class="sedan" href="javascript:getRedirectUrl('&mo=轿车')">轿车</a>
		</div>
	</div>

	<div class="banner">
		<div id="banner-slide" class="banner-slide swiper-container">
			<div class="swiper-wrapper">
			<?php if(is_array($banner)): $k = 0; $__LIST__ = $banner;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($k % 2 );++$k;?><div class="swiper-slide"><a href="<?php echo ($v["url"]); ?>" target="_blank"><img src="<?php echo ($v["img_url"]); ?>"></a></div><?php endforeach; endif; else: echo "" ;endif; ?>
			</div>
			<div id="swiper-pagination" class="swiper-pagination"></div>
		</div>
	</div>
</div>
<!-- subnav and banner end -->

<!-- introduce start -->
<ul class="intro clearfix">
	<li class="intro1">专业陪同过户，100%放心，更省心！</li>
	<li class="intro2">259项全面检测，行业标准，更可靠！</li>
	<li class="intro4">成功购车尊享超值大礼，为了一个口碑！</li>
</ul>
<!-- introduce end -->

<div class="hot">
	<p class="hot-title">热门好车</p>
	<ul id="index-tag" class="hot-tag clearfix">
		<li class="cur">为您推荐</li>
		<li>最新上架</li>
		<li>降价急售</li>
		<li>准新车</li>
		<li>练手车</li>
		<li>SUV</li>
	</ul>
	<a class="hot-all" href="/home/index/get_car_list?pa=0&ma=40&or=d&ci=<?php echo (session('citype')); ?>&pl=<?php echo (session('mycity')); ?>">查看全部&gt;&gt;</a>
</div>
<ul class="list clearfix cur" id="like">

</ul>
<ul class="list clearfix" id="news">
	
</ul>
<ul class="list clearfix" id="cutprice">
	
</ul>
<ul class="list clearfix" id="newcar">
	
</ul>
<ul class="list clearfix" id="wago">
	
</ul>
<ul class="list clearfix" id="suv">
	
</ul>
<a style="cursor:hand" href="javascript:tagRedirect('<?php echo (session('citype')); ?>','<?php echo (session('mycity')); ?>')"><button class="hot-more">更多<span id="hot-more" >为您推荐</span></button></a>

<!-- footer start -->
	
<!-- footer start -->
<div class="footer">
	<!-- company info start -->
	<div class="footer-company clearfix">
		<div class="footer-logo"></div>
		<p class="footer-phone">咨询电话：400-100-1313<br><span>（周一至周日 8:00-21:00）</span><br>售后服务专线：400-100-1313</p>
		<div class="footer-qrcode">
			<img src="/Public/Home/images/qrcode-wx.png">
			<p>关注微信</p>
		</div>
		<div class="footer-qrcode">
			<img src="/Public/Home/images/qrcode-wx.png">
			<p>下载APP</p>
		</div>
		<p class="footer-copyright">
			Copyright 2017 www.58lianche.com All Rights Reserved<br>蜀ICP备16031245号<br>
		</p>
	</div>
	<!-- company info end -->

    <!-- links start -->
    <div class="footer-links">
        <p class="footer-links-title">热门品牌：</p>
        <div class="footer-links-wrap clearfix" id="linkbrand">

        </div>
        <button class="footer-links-btn"></button>
    </div>
    <div class="footer-links">
        <p class="footer-links-title">热门车系：</p>
        <div class="footer-links-wrap clearfix" id="linkserise">

        </div>
        <button class="footer-links-btn"></button>
    </div>
    <div class="footer-links">
        <p class="footer-links-title">热门城市：</p>
        <div class="footer-links-wrap clearfix">
            <?php if(is_array($citys)): $i = 0; $__LIST__ = array_slice($citys,0,12,true);if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$city): $mod = ($i % 2 );++$i;?><a href="/index.php?m=Web&c=Index&a=changecity&ci=<?php echo ($city["mkc"]); ?>&citype=1"><?php echo ($city["mkc"]); ?></a><?php endforeach; endif; else: echo "" ;endif; ?>
        </div>
        <button class="footer-links-btn"></button>
    </div>
    <div class="footer-links">
        <p class="footer-links-title">友情链接：</p>
        <div class="footer-links-wrap clearfix">
            <?php if(is_array($linklist)): $k = 0; $__LIST__ = $linklist;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$link): $mod = ($k % 2 );++$k;?><a href="<?php echo ($link["url"]); ?>" target="_blank"><?php echo ($link["title"]); ?></a><?php endforeach; endif; else: echo "" ;endif; ?>
        </div>
        <button class="footer-links-btn"></button>
    </div>
    <!-- links end -->

	<!-- contact start -->
	<p class="footer-contact">四川伍捌链车汽车销售服务有限公司    四川省成都市天府新区天府大道南段2039号和美.海堂中心（天府创客）16楼1609号</p>
	<!-- contact end -->
</div>
<!-- footer end -->
<!-- footer end -->

<!-- sidebar start -->
<div class="sidebar">
	<div id="sidebar-phone" class="sidebar-phone sidebar-switch sidebar-close">
		<p id="sidebar-phone-error"></p>
		<input id="sidebar-phone-input" type="text" placeholder="填写手机号，座机加区号">
		<button id="sidebar-phone-btn">免费通话</button>
		<span class="sidebar-triangle green"></span>
	</div>
	<div id="sidebar-qrcode-app" class="sidebar-qrcode app sidebar-switch sidebar-close">
		<img src="/Public/Home/images/qrcode-wx.png">
		<div class="sidebar-triangle green"></div>
		<div class="sidebar-triangle white"></div>
	</div>
	<div id="sidebar-qrcode-wx" class="sidebar-qrcode wx sidebar-switch sidebar-close">
		<img src="/Public/Home/images/qrcode-wx.png">
		<div class="sidebar-triangle green"></div>
		<div class="sidebar-triangle white"></div>
	</div>
	<button id="sidebar-btn-close" class="sidebar-btn close"></button>
    <button id="sidebar-btn-phone" class="sidebar-btn phone sidebar-close">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;免费通话</button>
	<button id="sidebar-btn-app" class="sidebar-btn app sidebar-close">APP</button>
	<button id="sidebar-btn-wx" class="sidebar-btn wx sidebar-close">公众号</button>
	<button id="sidebar-btn-top" class="sidebar-btn top"></button>
</div>
<!-- sidebar end -->

<!-- feedback start -->
<div id="feedback" class="popup-cover">
	<div class="popup-wrap feedback-wrap">
		<div class="popup-main">
			<div class="popup-header clearfix">
				<p>意见反馈</p>
				<button id="feedback-close"></button>
			</div>
			<div class="feedback-body">
				<p class="feedback-title">感谢您的意见，我们会真诚对待！</p>
				<textarea id="feedback-content" class="feedback-textarea feedback-content" placeholder="您使用我们的产品过程中，有任何问题和意见，在这里可以畅所欲言，我们将据此优化我们的产品，为您提供更好的服务。"></textarea>
				<textarea id="feedback-contact" class="feedback-textarea feedback-contact" placeholder="如果您愿意，留下联系方式（邮箱、电话、QQ都行），我们将尽快回复您。"></textarea>
				<p id="feedback-error" class="feedback-error"></p>
				<button id="feedback-submit" class="feedback-submit">我要反馈</button>
			</div>
		</div>
	</div>
</div>
<!-- feedback end -->
</body>
</html>